import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {  path: '*', redirect: '/index' },
  {  path: '/index', name:'index',  component: () => import(/* webpackChunkName: "doapisIndex" */ '@/views/index')},
  {  path: '/list', name:'list', component: () => import(/* webpackChunkName: "doapis" */ '@/views/list')},
  {  path: '/channel', name:'channel', component: () => import(/* webpackChunkName: "doapis" */ '@/views/channel')},
  {  path: '/about', name:'about', component: () => import(/* webpackChunkName: "doapis" */ '@/views/about')},
  {  path: '/detail', name:'detail', component: () => import(/* webpackChunkName: "detail" */ '@/views/detail')},
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
